function e(e) {
    return e && e.__esModule ? e : {
        default: e
    };
}

function t(e) {
    return i[e];
}

Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.getFeedsSessionId = exports.setFeedsSessionId = void 0;

var r = Object.assign || function(e) {
    for (var t = 1; t < arguments.length; t++) {
        var r = arguments[t];
        for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
    }
    return e;
}, s = e(require("./urls")), o = require("./request"), n = e(require("./feedsActions")), i = {};

exports.default = function(e, i) {
    var d = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, a = getApp();
    if ("string" == typeof e && (e = n.default[e]), !e) throw new Error("缺少feeds流类型");
    var f = a.globalData, u = f.cardId, l = f.userInfo, p = f.bindStaffCardId, c = f.isBindStaff;
    if (u && l && (!c || p !== u)) {
        var v = t(u), I = r({
            templateId: e,
            to: u,
            feedsSessionId: v,
            from: l.userId,
            userName: l.nickName
        }, d, {
            params: i || {}
        });
        (0, o.post)(s.default.feedsReportUrl, I, {
            silentFail: !0
        }).then(function(e) {}, function() {});
    }
}, exports.setFeedsSessionId = function(e, t) {
    e && (i[e] = t);
}, exports.getFeedsSessionId = t;